#ifndef XMLSERIALIZER_H
#define XMLSERIALIZER_H



#include "serializer_global.h"
#include "abstractserializer.h"


#include <QDomElement>
#include <QDomDocument>



class SERIALIZERSHARED_EXPORT XmlSerializer : public AbstractSerializer
{
    Q_OBJECT

public:
    explicit XmlSerializer(QObject *parent = 0);

    virtual void serialize(QObject *source, QIODevice* output);
    virtual QObject *deserialize(QIODevice* input);


protected:

    virtual QDomElement toXml(QObject* source, QDomDocument doc);
    virtual QObject* fromXml(QDomElement elem, QObject* parent = 0);

    virtual QDomElement toXmlElem(QObject *source, QDomDocument doc);
    virtual QObject *fromXmlElem(QDomElement elem, QObject *parent = 0);


};

#endif // XMLSERIALIZER_H
